Method for distributed RDSMS

ABSTRACT

A method and potential embodiment for processing streaming data records is described which provides facilities for defining and naming multiple input and output data streams (along with their related transformation, filtering, aggregation and other processing operations) using relational processing definitions, abstractions and techniques similar to those found in relational database management systems (RDBMS) and which is embodied as a set of communicating stream processing nodes. Whereas RDBMS process queries on a centralized processing node against historical stored data records, DDSMS process queries on distributed processing nodes against future flowing data records. The result is a Distributed Data Stream Management System (DDSMS) comprising a set of relational stream processing nodes that work and communicate together in concert to perform useful distributed data processing for a variety of applications such as service monitoring, alerting, message brokering and other applications.

BACKGROUND OF THE INVENTION

1. Field of the Invention

This invention relates to the field of data management and dataprocessing and describes a method of integrating application or servicecomponents and sources and consumers of data records, normally over dataor computer networks. The sources of data might be softwareapplications, hardware devices, sensors, or data streaming into files ordatabases, or transaction records or transaction logs. The data mightrelate to a wide range of industries such as stock market data infinancial services, service health, status or usage records intelecommunications, or plant operating status in industrial automationto name just a few. In particular, the invention relates to ways andmeans of managing, viewing and processing streams of data recordsflowing between the elements making up information processing systems,and applications thereof. The concept of a relational data streammanagement system (RDSMS) is described and the invention is a specificmethod for performing data processing using a specific distributed RDSMSapproach.

2. Description of the Related Art

With the advent of the Internet, there are many new ways for designersof computer information systems to connect, integrate and manage thecomponents of the information systems and computer applications.

There are a number of university research projects (see web linkhttp://www-db.stanford.edu/sdt/) which are, in the main, focusing onextending databases to allow for stream processing, treating RDBMS(relational database management systems) relations as infinite tables.

The work so far published is focused on either extending relationaldatabases (or other databases) to add streams capabilities (such as theSTREAM project at Stanford University http://www-db.stanford.edu/stream/which is not distributed and does not support the manageability orplug-in capabilities described below), or to devise ways of improvingquery performance and scheduling and the theoretical resource managementchallenges (predicting how much processing can be performed within givenmemory and other computing resources). There are also some paperslooking (from a mainly theoretical perspective) at a fewmonitoring-style applications.

This invention differs from the existing published work in a number ofimportant ways. First, the focus here is on an invention, method ormeans for managing a distributed collection of relational streamprocessing nodes that work together as a single system to create acomplete Distributed Data Stream Management System (“DDSMS”). This DDSMSoperates as a single, manageable, extensible infrastructure, processingand managing multiple streams of records along with multiple views ofthose record streams including their routing across the network ofstream processor nodes. It differs from other systems described byproviding a novel combination of facilities, including an SQL interface(SQL is supported by most relational database systems today), andoperating as a single system managed and configured from a centralconfiguration server where the single system itself comprises adynamically extensible set of interoperating stream processing nodeseach of which supports a plug-in capability for dynamically extendingthe capabilities of the stream processing engines. Each node has notonly input and output interfaces to support streams, but also has acontrol and a configuration interface to support dynamic externalcontrol and management of nodes, and to allow nodes to control thebehavior of one another and interoperate with one another, with the goalof behaving and appearing like a seamlessly integrated single completesystem. The system manages multiple sources and destinations for thestreams, and covers specific business and technical applicationsthereof. Rather than concentrating on the design, method or means for aspecific relational stream processing node, this invention focuses onhow to design a whole DDSMS comprising a set of such or similar nodeswith specific capabilities that are configured and work together asseamless complete system. In comparison with systems such as Aurora (seeweb references link earlier), this approach differs in its treatment ofthe distributed nodes as a seamless single system with a centralconfiguration and management service, its support for a plug-inextensibility to allow specialization of the system for specificapplication domains, and its inclusion of control and configurationinterfaces for each processing node.

Finally, the invention includes a short list of applications of thisDDSMS which offer novel solutions to existing problems, and offercompelling business value and clear advantages over existing approachesand solutions.

SUMMARY OF THE INVENTION

A method and apparatus for a DDSMS (see earlier) is described. A DDSMcomprises a set of communicating data stream processing nodes. We alsodescribe a means for constructing stream processing nodes which arerelational in their processing and querying behavior (they conform tostandard relational processing logic and semantics as originallyinvented by Codd—see reference below), but which differs from some otherapproaches in that it does not include a persistent relational databaseelement. In other words, it is not an extension of a relationaldatabase, but is rather purely designed for relational streamprocessing. In this approach, any data that need to be stored in arelational database or processed from a relational database are streamedout of the DDSMS to an external database (or databases) or similarlystreamed into the DDSMS from external databases. In this way, a DDSMSarchitecture which interoperates with databases but which does notitself contain any database facilities for storing and managing tuplescan be created using sets of such nodes. The invention of the overallDDSMS here allows for either kinds of relational stream processingnodes—either the one included as part of this invention, or others thatare constructed as extensions to relational databases to support thenecessary relational streaming operations described below.

The method then describes various ways that the DDSMS can be used tosolve business or technical problems relevant to the real world. Theseare distinct and differ from those described in external publications.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1—A diagram showing an example of a deployment of a DDSMS, withStream Processing (SP) nodes, Central Configuration Store server (CCS)communicating with one another and with external computer applicationsby means of a computer data network. The cloud drawn represents thesingle, seamlessly integrated, complete management domain for the DDSMS.

FIG. 2—A diagram showing the abstract architecture of an individual SPnode made up of its component parts (subsystems). The four externalinterfaces to node are shown and labeled, along with internal andexternal data flows. The fat arrows indicate flows of data records,whereas the skinny arrows indicate exchanges of control data. If anobject overlaps and is on top of another object, the latter represents asubsystem of the former. Data paths between systems and their subsystemsare not shown and are implicitly assumed.

DETAILED DESCRIPTION

A. System Overview

1. Terminology

The Relational data model is based on the mathematics of relations andis derived from the seminal work of E. F. Codd [“A Relational Model ofData for Large Shared Data Banks”, CACM 13, No. 6, June 1970]. So far,commercial embodiments of the relational data model have been realizedas Relational Data Base Management Systems (RDBMS) such as Oracle andothers. Academic work, led by the database research communityworld-wide, has recently focused on applications of the relational datamodel to streaming data records or tuples. These streams are modeled as(potentially) infinite data tables, often with timestamps on each row ofdata. A row corresponds to a record that arrives in real-time.

In the below, the term “tuple” and “record” can be used interchangeably.A tuple is a relational term for an ordered collection of fields. Ann-tuple has n fields. For example, a triple is the same as a 3-tuple,and has three fields. In the methods described in the claims of theinvention the terminology used is “records”. This is because records arewhat most real world information systems process. Such records arerepresented as tuples when processed using the method of the invention.This will become clearer as the method and means are described.

A Relational Data Stream Management System (RDSMS) is the similar to aRelational Data Base Management System (RDBMS), but processes streams ofdata records rather than tables of data records. Relational operationsare similarly applicable to streams just as they are when defined overtables (relation operations such selection, projection, joins, unionsetc). This means that relational queries and processing operations,which are mathematically well defined, can be logically extended to havesimilar simple yet powerful mathematical meaning when applied tostreams. Such relational stream operations have a declarative semantics,which offers key benefits in the world of data management. Thedeclarative nature of their semantics allows one to define relationalexpressions that can be used to derive a new stream of records from anexisting stream by describing what the properties are of the records ofthe derived stream, rather than by detailing exactly how to constructthe new stream from the old in terms of the specific processingoperations to be performed. In other words, the logical mathematicalrelationship between the new stream and the original stream isdescribed, instead of the sequence of record processing operations onemight perform in order to create the new stream from the old. Suchmathematical (logical) semantics allows the rewriting of a relationalexpression with another equivalent perhaps simplified relationalexpression, while guaranteeing that the expressions are semanticallyidentical. This is immensely useful in allowing for automatic queryoptimization, where a software optimizer can rewrite retrievalexpressions into others that are identical but more efficient wheninterpreted by stream processing software.

A single node RDSMS can be constructed as a superset of a conventionalRDBMS that processes potentially multiple input data streams andgenerates potentially multiple output data streams along with the usualrelational database tables. This describes the nature of the workperformed at Stanford University [Jennifer Widen et al.,http://dbpubs.standford.edu/pub/2002-41]. However, we describe here aninvention of a RDSMS that it is not an extension of a RDBMS, processesonly streaming data (it does not manage persistent tables) andadditionally interacts with other RDSMS nodes, which together constitutea single integrated relational stream processing system. The streamprocessing is performed in what we call a relational Stream Processing(SP) node. A single SP node and its Configuration Store (see later)together comprise a RDSMS. If there are multiple SP nodes interoperatingthen we have a different invention, which we call a Distributed DataStream Management System, which is the main focus of this invention.

The main invention we describe is such a Distributed Data StreamManagement System (DDSMS). A DDSMS comprises a set of relational SPnodes, and is managed as a single system to provide an infrastructuresolution for processing streaming data over a large scale computernetwork with multiple and potentially distinct sources of anddestinations for streaming data. The streams are routed across therelevant RDSMS nodes in order to perform the processing required, withpotentially multiple concurrent streams of data crisscrossing thenetwork of SP nodes. The DDSMS is relational in terms of its dataprocessing, and its data can be viewed as flows of relational tuples.Tuples may contain fields which normally contain the same kinds of datatypes commonly found in a database (such as integers, floats, dates etc)and which might also be variable length or variable format types such ascharacter strings, bit strings or other binary content (such as audio,video, or pictures, or other digitized data).

2. Comparison of DDSMS Model with RDBMS and RDSMS Models

Whereas an RDBMS (relational database management system) and the newlyemerging RDSMS each are usually single node systems (there is a serverthat processes a stream of queries or transactions and generates astream of results), a DDSMS comprises a set of distributed SP nodes.These nodes interoperate in order to behave as a complete seamlesssystem that achieves the data stream processing specified in itsrelational operations. Whereas creating Distributed DBMS entailsovercoming the major technical challenges of synchronizing multipledatabases over potentially large geographically separated nodes (and sonever really have been successful in the marketplace), DDSMS arerelatively straightforward to construct and work elegantly andefficiently. They work well because there is no shared global state tosynchronize, and all the relational operations are side-effect free(i.e. truly declarative in nature). Relational operators operate onstreams as inputs, leave those streams unaltered (to flow to otherpotential consumers), and then generate instead new streams as outputswhich can in turn flow to other SP nodes. The specific techniques andarchitecture of the invention are described below.

3. Relational Data Streams

First let us visualize a relation as a table of rows comprising thetuples of that relation, just as is found in a RDBMS like Oracle. Therelational operators of Projection (selecting a columns from a table tocreate another table holding only those columns), Selection (retrievingrows that match certain criteria), Joining (where two tables are mergedby matching on a common attribute that is defined as a given column),Union (merging two tables by set-theoretic multiplication of the tuplecombinations) and other relational operations can all be readilyre-interpreted to apply to record streams resulting in the creation of anew record stream. The records in the streams correspond to the tuplesin a relation. Projection and Selection have a natural and obviousmeaning when applied to streams. Projection filters out only the fieldsspecified in the Projection specification and Selection filters out onlythe tuples that satisfy the Selection specification. Joins and Unionalso have an obvious interpretation, but we first need to add a timefield. The notion of a time window is then introduced which is appliedto any relational operations. For example, a Join operation might bedefined over a time window of five minutes. The meaning is that thestreams are joined only for matches of tuples made over the given timewindow. Such time windows can be specified to be Rolling or Paged. Theformer means that when an operation is applied over a rolling timewindow of say n minutes, only records whose time field lies within thelast n minutes of the reference time of processing are considered. Hencea single tuple might participate in multiple successive operations,until it is too old to qualify for processing in what becomes the newcurrent processing time window. For example, operations might be totalsof tuples over the last 5 minutes. You can visualize a time windowsliding or rolling over a series of tuples. In comparison, the pagedtime window pages over the tuples so that every tuple occurs in only asingle time window. When totals of tuples are calculated over 5 minutepaged windows, then you will get an aggregation of tuples with only asingle aggregated output tuple for each 5 minute interval. In Paged timewindows all time is chopped up into non overlapping time intervals and arecord will always belong to only a single window—different from rollingwindows where records belong to many different successive rollingwindows. When two streams are Joined, records are matched using the joinfield (a field that must exist in all records to be joined) for recordsthat lie within the same (specified) time window (based on thedesignated time-stamps of those records) and the result of each suchmatch is the creation of a new output stream record comprising a unionof the original fields of the constituent records. The nature of thematch varies according to the type of Join. For example, in an Equi-jointhe matching comparison is simply equality (and normally the matchingfield is included only once in the output record since the values areidentical). Other joins are also possible, such as “>”, “<”, sub-stringand many others. Such Join operations have practical application such asin matching buy-sell transactions for a given financial instrumentwithin a given time window given streams of buy requests and sellrequests. Another application is pulling together all of the pieces of acommercial transaction (integrating data from multiple sources such asmultiple service elements) and matching on a shared transaction id (orperhaps IP address) within a given time interval in order to create acomplete, integrated transaction record. Records falling outside thetime window are deemed to be either erroneous (to be processedexternally later) or else are from separate distinct transactions. Suchbehavior is important in real-time decision making applications in manyindustries including financial services and telecommunications. Anextended subset of SQL is the preferred language for representing thedefinition of streams, but graphical and other alternative ways ofrepresenting the definitions is permitted also in addition to SQL. Thesubset of SQL is given by the purely relational operations (allprocedural and database state manipulations are omitted). The extensionsare based on the incorporation of time windows. For example, a given SQLquery might specify a stream which comprises two input streams joined byIP Address over a paged 5 minute time window. This would look identicalto an SQL fragment for joining two input tables on the IP Addresscolumn, except that the time window value (5 minutes) and nature (pagedrather than scrolled) must be either implicitly (through some defaultvalue or configuration parameter) or explicitly (a Window statement orsome kind is added to extend the SQL language—hence an extended subsetof SQL, a subset because there is no meaningful interpretations for theprocedural and other database specific non-relational operations thatare also part of the SQL language).

4. System Management, Set-Up and Configuration

Streams in the DDSMS can have names, can have security accesspermissions (to allow particular users or applications or groups thereofto read the records of the stream) and are defined by a relationalexpression—a set of relational operators that operate on streams (asdefined in the previous section)—which in turn might operate on othernamed streams. Such relational stream expressions can be nested (as inSQL for relational queries for RDBMS). The relation expression can alsoinclude the names of programs (or plug-ins) that can also generatestreaming data (there has to be some way of generating the originalsources of streaming data). The system normally comes with a set ofuseful such programs and plug-ins to stream data from and to relationaldatabases, files, directories of files, and to encapsulate the outputsor inputs for other programs and applications (using operating systemstreaming primitives and redirecting inputs and outputs of suchprograms). The system is normally extensible, so that new plug-inprograms can be written to extend the system dynamically. Plug-ins alsocan perform computational processing of tuples, consuming and generatingtuple streams, thereby providing extensions to the usual relationaloperation vocabulary.

Streams also have a location that corresponds to the host system thatcreates the stream. Where a stream is replicated for load balancingpurposes, there might be multiple locations—but for each instance of thereplicated stream (the location of which is resolved at connecttime—i.e. when a user or application tries to read the stream) at anygiven time interval there will be stored somewhere in the DDSMS theidentity of the host machine responsible for generating the tuples ofthe stream. Some implementations of the DDSMS might expose the identityof the host machine of a stream. Other more sophisticatedimplementations may hide the source machine, and alter it dynamically,in order to perform optimization of the stream processing by relocatingthe stream to another more favorable machine (favorable in terms ofprocessing power, physical location, network bandwidth, utilization,disk or main memory capacity etc). Another example might entail breakingdown a single stream generating operation into separate sub-streams thatflow into one another, and then redistribute the work to differentmachines for each sub-stream. This might happen as the result of asophisticated automatic or dynamic optimization operation.

The DDSMS may support a method to perform Global Optimization to improvethe system performance by analyzing the relational stream definitionsand interdependencies, and by automatically rewriting the relationalexpressions (the stream definitions) with alternative, logicallyequivalent but more efficient definitions (in terms of execution). Suchoptimized relational definitions may include embedded directives thatare used in the execution of the stream expressions and also that areused in distributing the stream definitions to the relevant SP nodes.The rewriting approach is modeled after similar relational rewritingprocedures of relational databases, but reinterpreted in the streamingcontext, and with differing “cost functions” that evaluate the goodnessof the optimization progress and of the rewritten expression. Theoptimization goal is to improve the performance of the DDSMS by breakingup the relational stream operations or definitions (which make up thedefinition of the stream or view) into component pieces that areallocated to different SP nodes. In this way, for example, streams mightbe aggregated close to their source, rather than transmitting everyrecord across an expensive network only to then perform aggregation. Theorder and placement of the SP operations onto specific SP nodes can makea tremendous difference to the overall system performance. Theoptimization is performed in conjunction with a specified OptimizationPolicy and considers metrics available about the physical processingcharacteristics of the individual stream processors (SP nodes), and thecomputer infrastructure that is used to host and execute them(optionally including, without limitation, the speed and nature ofindividual computer systems such as system execution cost, clock speed,memory, number of processors, operating system, execution workload, alsoconsidering the bandwidth, speed or network connection costs, or networkreliability, and the size, speed and cost of storage whether that bemain memory or secondary storage). It also takes into considerationOptimization Constraints and parameters such as the maximum amount oftime to spend on optimization. The policies include, without limitation,differing optimization goals either for the complete system or forspecific streams such as maximizing total throughput, minimizinglatency, minimizing cost, minimizing transmission or retransmission ofdata, minimizing or maximizing loads on specific computer systems ornetwork links, or maximizing reliability. Such optimization optionallycan be performed dynamically, whereupon the DDSMS would transparently(to the outside world) relocate and restructure streams from one SP nodeto others as the execution of the transformed relational streamexpressions requires. The current status and location of the componentsof the stream are always held in the Central Configuration Store. Theoptimizer might perform factoring, where anonymous sub-streams arecreated and reused in the definition of other streams. Such sub-streamsallow for efficient reuse of DDSMS system wide resources and can reducetransmission, retransmission and avoid redundant stream processing too.

Streams implicitly have a defined structure in that the names, types andorder of the fields in the tuples of the stream will be defined by therelational expression that makes up the stream. Each tuple comprises aset of self-describing data items called fields, which are essentiallytriples. Each triple has a name, type and value such as <Family, String,“Black”>. The allowed type definitions should match the conventions ofRDBMS and SQL (types are called domains in SQL) to allow familiarity andeasy integration. The names of all fields (or attributes—another termfor the same thing) are held in a central configuration store, alongwith type definitions and stream definitions.

The Central Configuration Store server (CCS) is a server thatcommunicates with all nodes in the DDSMS. Each node comprises anindividual SP node, which performs the stream processing consistent withits stream definition as held in the CCS. Each node caches itsconfiguration data in case the central configuration store isunavailable. Any changes in the configuration store can be broadcast toall nodes, or else there are tools that allow a more controlled andselective dissemination of the changes made (to ensure that theresulting streams make commercial and consistent sense, as there mightbe dependencies within and outside of the system that need to be takeninto consideration before such changes are more widely made).

FIG. 1 (see drawings) illustrates a system including one embodiment ofthe invention. Applications running on external computer systemsgenerate and consume streams outside of the DDSMS, and each stream isdefined as a relational view (e.g. SQL views A through D)—that is, theinterpretation (or execution) of the relational expression that definesthe stream by the DDSMS and the Stream Processing (SP) nodes that itcomprises. The cloud drawing represents a computer data network linkingthe SP nodes, CCS and external computer systems. The arrows representdata flows. The benefit for external applications and data consumers isthe ability for each to define its own view on the streams, creating newstream definitions to meet its own specific needs on top of existingdefinitions. This offers a data abstraction, insulating the applicationsand users from changes to stream structures that might happen outside(e.g. changing external sources of data or format of data).

B. Architecture and Embodiment of DDSMS

FIG. 1 (see drawings) illustrates the conceptual architecture of theDDSMS. A DDSMS essentially comprises a network of communicating streamprocessing (SP) nodes along with a Central Configuration Store Server.One embodiment of such a system would comprise a program acting as alogical server for each of these entities. The code of each SP node isessentially similar, but each one performs the stream processing asdefined by the definitions of the streams that it is hosting, at anygiven time interval. Each stream might be transmitted as TCP-IPmessages, used to communicate between the servers. Alternatively UDP-IPor other protocols may be used. Streams are made up of records whichrepresent tuples, and each tuple comprises a set of fields whichthemselves are triples (to hold and describe the record's data). Oneembodiment of such a triple would be a variable length record itselfcomprising two fixed length fields (to store the field's name and typeidentifiers) and a variable length field (to hold the field's value).Each record in the stream might then consist of first a header thatindicates the number of fields in the record, followed by the variablelength fields themselves. A stream would then be made up of a sequenceof such tuples (a tuple is a collection of fields) sent in batches, thebatching determined by the arrival rate of the records. The batch sizeis determined to be a convenient (cost effective) unit of transmission,but if records are arriving slowly, the system might output batches ofeven a single record (in order to avoid delays in transmission). Thebatching policy is determined by a Local Optimizer, which optimizesaccording to configured optimization directives (for example, tomaximize throughput or to minimize latency of transmission). Such abatch would store the number of records in the batch followed by therecords, and the entire batch would be sent as a single networktransmission message. The stream itself is made up of such a sequence ofnetwork messages.

The architecture of one embodiment of a SP node is shown in FIG. 2 (seedrawings). Protocols other than TCP-IP may be used as the basis of batchtransportation. All input streams are directed to a SP node through itsInput Interface. All output streams are directed to external systems orother SP nodes through the Output Interface of the SP node generatingthe stream. The Output Interface optionally supports efficient means forbroadcasting or multicasting tuples over data networks (so as to avoidrepeated unnecessary point-to-point transmission of data where thenetwork supports a more efficient means) in such a way that the InputInterfaces of the target SP nodes will receive those tuples.

With the data structured into batches this way, streams can be consumedand generated by the stream processing nodes tuple by tuple, and eachreceiving node can break down the tuple into self-describing data items,right down to the field level. The destination machines (for example,given by the IP address along with the TCP-IP port) for a stream at anygiven time interval can be determined from the current state of thecached configuration information. Any changes in configuration aredisseminated by the CCS according to a configurable specified policy,which includes broadcasting all changes immediately. The streamprocessing nodes normally have a thread or process that continuallylistens to a known TCP-IP port for any configuration or other controlinformation (such as starting and stopping) that might be sent (normallysent by the configuration server). This constitutes the ManagementInterface of the SP node.

The Central Configuration Store server might be embodied as a RDBMSapplication, using a relational database to store the configurationinformation such as the stream definitions and machine location, accessrights and the definition of all currently known field names and types.The central configuration server should normally be deployed in ahigh-availability configuration with a hot stand-by ready to take overupon any failures.

All of the servers (stream processing nodes or configuration servers)comprise logical servers and might be mapped onto one or many computerservers or systems. In other words, there is the concept of theseparation of logical servers from physical servers, to allow fordifferent and changing physical deployments. This will make no logicaldifference to the processing, but will definitely impact the hardwaredeployment architecture. Individual nodes and servers in someembodiments may be able to take advantage of multiple processorcomputers in order to increase through-put processing capacity.

As tuples enter the DDSMS, the system generates timestamps to label eachtuple with the time of entry. The timestamps need to be of sufficientgranularity to meet the needs of acceptable precision vis-à-vis the timewindow specification of the relational stream queries. Ideally, alltimestamps should be based on international standard time code (such asUTC —Coordinated Universal Time) to avoid complications of comparingdata from different time zones. Alternatives are permissible. Queriesmay specify that alternative fields should serve as timestamps (whichmight correspond instead to some time or key more pertinent to thespecific application that is using the DDSMS). An example might be therecord creation time at the record's original source, or perhaps thetime of the original transaction etc). Timestamps of output records arederived from the timestamps of input records. They can be alsoexplicitly defined (just as the other output fields are explicitlydefined as a part of relational stream definition of the resultingoutput stream) or else a default policy can be set where the outputtimestamp is automatically created (often given as the earliest, latestor average of the input timestamps of the records contributing to theoutput record). In order to ensure time synchronization across all SPnodes standard techniques should be employed to synchronize machineclocks (such as using NTP and other well proven mechanisms). When thetimestamp is given by an existing field, it should have numericalproperties consistent with the windowing semantics applied to time, sothat the window specification and queries are meaningful. For example, arecord key which is a monotonically increasing quantity might makesense.

Some embodiments of the DDSMS will include reliable retransmission ofdata between nodes. Each node buffers up its output streaming tuples, incase there is a need to retransmit the data. The amount of buffering isa configurable item and depends upon the amount of space required tostore the tuples. The buffers optionally can be stored on disk to allowfor potentially large amounts of data. There is a handshaking protocolin such system embodiments (operated over the SP node's ControlInterface) that allows consuming nodes to indicate that they havereceived certain stream data tuples and have no further retransmissionneeds from the source (that is, to signal back to the sender that fromits own perspective, it will never need again to seek retransmission ofthe tuple; this implies that the records will have in turn been passedon to another consumer downstream that has indicated they have beenreceived and processed; this might in turn continue recursivelydownstream through other SP nodes). The handshaking is performed by oneSP node with another through their Control Interfaces. The ControlInterface might be physically implemented as part of the InputInterfaces or Output Interfaces, interleaved with the in the input oroutput transmission of record streams (interleaved somehow). These arephysical alternative embodiments of the same logical design. The ControlInterface is, however, a separate logical entity of the SP node.

The stream generator, when it has received such acknowledgments from allconsumers, will dispose of buffered tuples which are no longer needed.The SP node manages the output tuples in a Retransmission Buffer,holding all output tuples in that buffer until it is signaled that it issafe to now dispose of the tuples. Retransmission Buffers can beconfigured to be persistent, in which case the tuples are written to anoutput queue stored on disk or similar persistent media managed by thePersistent Store. The main memory space and disk space allocated for theRetransmission Buffers are configurable quantities and constrain themaximum number of tuples that can be stored before tuples have to bedropped. If a consumer fails, when it comes back to life, it transmits a“back alive” message to all stream suppliers, so that they canretransmit “unacknowledged” records—those that were not acknowledged asfully processed (in such a way as to be independent of a failure of theacknowledging node). One embodiment of such a recovery mechanism canalso use Recursive Recovery, where a node can seek in turnretransmission of tuples from its suppliers, reprocesses those tuplesand then streams the regenerated data out again in order to meetretransmission requests of external consuming nodes. This allows formore recovery scenarios and allows for reducing the buffering space ofintermediate SP nodes (as they might be able, if necessary, to takeadvantage of other upstream sources of tuple supply—nodes furtherupstream). When tuples are transmitted, there should be a way ofrecognizing the identity of the tuple, in order to avoid processingduplicate retransmitted records. Such a scheme might utilize thetimestamp of the record along with a unique serial number field,generated by the SP node. The SP node has to store sufficientinformation in order to be able to regenerate accurately any such recordidentification information, in such as way that consumers ofretransmitted records can detect and remove duplicates.

Embodiments of the system with such recovery mechanisms as recordretransmission and Recursive Recovery allow for systems with veryreliable data delivery, but which will take time to “catch up” whileretransmitting or reprocessing data. Such systems are suitable forbilling applications or applications where data loss must be minimize oreliminated (commercial transactions for example). Not all applicationswill need this capability. This capability complements other techniquessuch as hot standby processing nodes using high availability techniques.An embodiment might allow optional configuration of such recoverymechanisms, according to system throughput, reliability and solutioncost goals. Reliable transmission can be disabled in order to reducebuffering space and speed up throughput, in which retransmission oftuples might not be possible. Similarly, Recursive Recovery wouldnormally be an additional option to the more basic recovery mode ofsimple retransmission of tuples from the Retransmission Buffers.

Tuples arrive through the Input Interface of the SP node and arebuffered for efficiency to smooth out any fluctuations in arrival rate.If too many records arrive to be buffered safely, a message is sent backto the sender's Control Interface to signal it to suspend or slow downtransmission. Similarly signals can be sent to resume normaltransmission. The Retransmission Buffer of the sending SP nodes willhold tuples until the consumers are ready to process them.

The tuples flow next to the Stream Engine, which executes the relationaloperations of the streams that are configured for that SP node. Thetuples are presented to the relevant relational views and output tuplesresult. The Stream Engine manages a number of threads in order to takeadvantage of multi-processor computer systems, and will have differingimplementation with differing levels of optimization and scheduling ofstream operation execution. Indexing of stream definitions will beperformed for cases where there are large numbers of streams present.This ensures efficient distribution of tuples to relevant streamoperation executors or interpreters. The Local Optimizer allowsoptimization of the execution of stream definitions locally, allowingfor techniques like compilation into natively executing code. The StreamEngine is effectively a virtual machine implemented in software thatprocesses relational stream operations. The Thread Manager manages thepool of active threads and is effectively part of the Stream Engine.

The Stream Engine responds to control commands that arrive through theControl Interface, and permit external entities to start, stop and resetthe engine or specific streams, and other relevant control operationsrelated to retransmission, recovery and relocation of streams.

The stream definitions and other configuration information arrivethrough the Configuration Interface. The CCS can also send out specificplug-in processing execution modules to specific SP nodes to bedynamically loaded into the stream engines of those nodes. The loadingand unloading of such modules is handled by the Plug-in Manager. Suchplug-in modules represent executable code used to enhance the processingoperations of the Stream Engine. This is to allow for additional orupdated relational operations to be loaded without taking down the SPnodes concerned. It also allows for custom plug-ins to be written withan external plug-in development kit which allows system or applicationspecific operations to be performed. For example, all physicalcommunication with operating system files, streams, databases orapplications is performed with such plug-ins, and can include datainput, data output and data transformation operations. There areprimitives supplied for iterating and otherwise processing tuples withinthe given time window specification and to similarly access and processthe fields of those tuples. Plug-ins are managed through the CCS and aredynamically loaded, unloaded or replaced. A variety of programminglanguage interfaces is supported.

As the Stream Engine generates tuples of output streams, it passes thetuples one by one to the Retransmission Buffer manager which in turnpasses them on to the Output Interface. From there they are transmitted,multicast or broadcast to the consuming SP nodes according to theconfiguration information of the stream (as sent by the CCS).

C. Configuration and Management of Streams and Stream Processing over aNetwork using the DDSMS

Configuration is performed by interacting with the central configurationstore server. There are many embodiments possible (above an embodimentis described using relational databases). Streams can be defined as SQLexpressions or views. Stream definitions can written in a language thatis an extended subset of SQL, one which allows for the specification oftime windows (see above) but which does not support the non relationalSQL operations (of which there are now many in SQL including those forupdating databases, imperative programming etc.).

Alternatively, some embodiments may optionally offer a GUI basedconfiguration of a “nodes and arcs” form, where nodes correspond torelational stream operators and arcs correspond to stream flows. Such adataflow GUI is a natural way of representing the stream definitions.

Other embodiments are also allowed to co-exist using alternativerepresentations of streams and the stream processing operations, such asones based on predicate calculus (where streams are defined in terms oflogical predicates —Boolean expressions on records and their fields—thatmust hold to be true for each record that is treated as a valid recordof the stream, cf. the membership predicate of a set definition). Forexample, the programming language Prolog can be viewed as offering oneway of defining relations, and so in this context, could be readily usedas the basis of streams definitions (another way of stating this is thatpredicate calculus's Horn clauses can be used to define streams). {Forthe so-called “data logic” subset of Horn clauses where there are noembedded functions inside the predicates, only atoms and variables,there is an equivalence in expressive power with relational calculus(relational expressions with projection, join etc) for definingrelations. Such definitions can be readily translated from onerepresentation to the other and hence can be executed by the sameRelational Stream Engine of the SP nodes. Timestamps of output recordsare derived from the input records.}

Configuration of the fields is straightforward, and follows theprinciples adopted by many other data dictionaries or RDBMS. Fielddefinitions can be added, deleted or updated. The actual data of thefield instance flowing through actual live streams will be unaffected bysuch changes once such data have been created. This is intentional andreflects the fact that the fields are essentially self-describing (seecomments on fields' triples elsewhere). For configuration changes totake effect, they need to be communicated to the SP nodes through a setof provided commands.

All editing of configuration data (including operating parameters,stream definitions, field definitions, plug-in executable moduledefinitions including file name and nature of the executable such asexecutable format etc) is performed through a web-based user-interface,preferably with mechanisms to import and export configuration data inXML format in files in order to facilitate external management ofdifferent versions of the complete system configuration. This is usefulfor testing purposes and to allow reinstatement of earlierconfigurations following disasters. The CCS itself in some embodimentswill also support versioning of configurations whereby an archive ofdifferent complete configurations is maintained.

D. Applications of DDSMS

DDSMS have many potential applications. First they can be used toprocess streaming records from distributed service components orelements to aggregate down, filter, and otherwise construct completetransaction records for analysis or billing. They have applications inbilling for wireless and wire-line telephony, for data and otherservices.

Secondly, they can be used for data preprocessing and collection inorder to efficiently build databases and data warehouses, providing areal-time and much more flexible technology to replace today's primarilybatch oriented ETL tools (Extract Translate and Load) such as the ETLproducts of companies like Informatica.

Thirdly, they can be used to construct distributed peer-to-peerapplications as an alternative to Message Broker technology. Messagebrokers allow applications to communicate through so-called “Publish andSubscribe” interfaces, passing data record by record. They have thedisadvantage that they force people to program such services with whatis often called inverted logic (also known as event processing logic)where the receiver program has to be written with programming logic thathas to allow for the program to receive records of potentially any typeand at any time. This is in order to allow for the occurrence of anytype of event that might transpire at any time. State machines have tobe written to keep track of where the program is in the overalllifecycle of processing data. DDSMS offer a number of advantages overMessage Brokers. They allow multiple, differing views of data streams tobe defined (much more flexible and powerful than just the “publish andsubscribe” facility of Message Brokers, which itself is similar tosharing streams of a given name). The stream is, by nature, a sequenceof records, and thereby allows for conventional non-inverted logic,where applications are written as structured loops processing therecords as they arrive. There is no need to create a separate statemachine, and structured programming techniques readily apply. Suchprograms are not normally interrupted by the arrival of the next recordbefore the current record has been processed (unless the logicexplicitly requires parallel execution using so-called unblocked I/O andmultiple threads). DDSMS allow for powerful operations to define theseviews, with power and usefulness similar to RDBMS views. They allow fornon-inverted sequential processing logic to process streamsrecord-by-record. They allow for the benefits of efficiency andscalability that arise from designing a system around large volumes ofstreaming records. They allow the reliable transmission andretransmission of data, with a technology designed for coping withbursts in data arrival rates. Message Brokers typically have problemsscaling beyond a few thousands of records per second. DDSMS should beable to scale to hundreds of thousands of records per second. MessageBrokers typically drop records if they arrive in bursts. For example, atthe time of writing, the RendezVous message broker of Tibco, accordingthe FAQ on their current website (at the time of writing) will droprecords after 5000 have been queued up in the input buffer of aRendezVous server. This is not uncommon. Recursive Recovery describedabove offers an effective solution to this data loss problem whencoupled with the Control Interfaces of SP nodes.

DDSMS have strong applicability for processing input data from sensorssuch as location based devices, environment sensors, machinery statussensors, plant equipment sensors, and those of engines, vehicles, andinstruments. Such sources generate large volumes of data that need to bepreprocessed into more manageable streams for consumption in manyback-end applications such as monitoring, alarming, billing and analysisfor real-time decision making. It is a suitable basis for building SCADAand other industrial automation applications.

Other applications exist for network monitoring for all kinds ofnetworks: electronic data, mobile, wireless, electricity, water, otherutilities, highways, airways, railways and waterways—to be name but afew. The source of the data might be from SNMP MIBs (networkingequipment standard) of instruments or devices, from other similarstandardized protocols (e.g. CMIP), or held in proprietary structures ordelivered by proprietary management protocols. Preprocessed data can beused for a wide range of applications including fraud detection,surveillance, service usage billing (both pre and post paid) andanalysis applications.

E. Alternative Embodiments

There are many other potential embodiments of DDSMS, and severalvariations are described above.

F. CONCLUSION

The foregoing description of various embodiments of the invention hasbeen presented for purposes of illustration and description. It is notintended to limit the invention to the precise forms disclosed. Manymodifications and equivalent arrangements will be apparent.

What I claim is:
 1. A method of managing and processing streams of datarecords over a data communication network means linking a plurality ofdata processing computing means comprising: (a) providing a plurality ofstream processing node means for consuming and generating streams ofdata records executing on said data processing computing means, (b)providing a central configuration store means for holding configurationdata describing the names of said streams, and describing relationalstream processing operations and other configuration and definition dataof said streams, and for holding configuration data of said streamprocessing node means, said central configuration store means executingon said data processing computing means, (c) configuring said streamprocessing node means using a user-interface means to manage theconfiguration data in said central configuration store means, which inturn communicates over said data communication network means with acollection of said stream processing node means to effect configurationchanges needed therein to maintain consistency of configuration data ofsaid stream processing node means with respect to the configuration dataheld in said central configuration store means, (d) generating with atranslation means said relational stream processing operations fromrelational stream processing definitions input through saiduser-interface means and then storing said relational stream processingoperations in said central configuration store means, after which saidconfiguration store means communicates with said stream processing nodemeans to effect configuration changes therein, (e) communicating withexternal data generating means to create input streams for processing bysaid stream processing node means, (f) communicating with external dataprocessing means to consume output streams of said stream processingnode means, (g) transmitting using said data communication network meansdata records in the form of streams comprising sequences of data recordseach of which comprises a set of named data fields, said transmittingbeing from some of said stream processing node means to others of saidstream processing node means in order to be further processed accordingto the definitions of the configuration data held in said centralconfiguration store means, (h) processing streams transmitted to theinput of each of said stream processing node means and creating outputstreams from said stream processing node means, said processing beingperformed within each of said stream processing node means according toa set of relational stream processing operations by a relational streamengine means, and where said relational stream engine means has aplug-in management means for extending its stream processingcapabilities, (i) controlling said stream processing node means througha control interface means of each stream processing node means in orderto control the execution of said stream processing node means, (j)configuring said stream processing node means through a configurationinterface means of each stream processing node means, and (k) allowingeach of said stream processing node means to interoperate with oneanother through said control interface means in order to control thetransmission of records between said stream processing node means,whereby data records of said external data generating means areprocessed generating data records for consumption by said external dataprocessing means according to the relational stream processingoperations stored in said central configuration store means and using aplurality of said stream processing nodes means to perform saidprocessing.
 2. The method of claim 1 wherein said relational streamprocessing definitions are written in the sql 2003 language, saidlanguage being the relational data manipulation language standardized bythe American National Standards Institute.
 3. The method of claim 1further performing global optimization according to a set ofoptimization criteria stored in said central configuration store means,said global optimization comprising analyzing the configuration data ofsaid central configuration store means and generating and storing newconfiguration data in said central configuration store means, andconsequently changing the configuration of said stream processing nodemeans while preserving the input-output behavior of the complete systemwith respect to the data of external data generating means and the dataof external data processing means, in order to reduce resources requiredfor execution by said stream processing node means whereby theprocessing performance of said stream processing node means whenoperating as a complete system is optimized.
 4. The method of claim 1further performing local optimization within stream processing nodemeans, said local optimization comprising analyzing the configurationdata of said stream processing node means and modifying the executionplan of said stream processing node means while preserving theinput-output behavior of said stream processing node means with respectto the input data and the output data of said stream processing nodemeans, in order to reduce computational resources required for executingsaid execution plan.
 5. The method of claim 1, further providingrecovery processing where stream processing node means communicate oversaid data communication network means to other relevant streamprocessing node means to request retransmission of data records in orderto recover from detected failures.
 6. The method of claim 1 wherein allof said stream processing node means execute on a single data processingcomputing means.
 7. The method of claim 1 wherein said stream processingnode means store streams in a recovery buffer means for possibleretransmission.
 8. The method of claim 7 wherein said recovery buffersare stored in persistent store means.
 9. The method of claim 1 whereinthe relational stream processing of records is performed in real-timeaccording to timing constraints stored in said central configurationstore means.
 10. The method of claim 1 wherein communicating withexternal data generating means results in generating streams of recordseach of which are automatically augmented with a timestamp fieldindicating their time of creation.
 11. The method of claim 10 whereinthe processing of records is performed in real-time, the timing of saidprocessing being governed by timing constraints stored in said centralconfiguration store means.
 12. The method of claim 1 wherein saidexternal data generating means generate records in the format producedby some external software application components and said external dataprocessing means consume records output by stream processing node means,where said application components are executing on some computing means,and wherein said method thereby translates records from said format tothe required input formats of other application components, wherebybenefits are afforded of simple and efficient data transformation andinsulation of said application components from changes to one another.13. The method of claim 1 wherein said external data generating meansgenerate records representing messages produced by external softwareapplication components and said external data processing means consumesaid messages, where said application components are executing on somecomputing means, and wherein said method thereby brokers messagesbetween said application components, whereby benefits are afforded ofsuperior message flexibility, superior message throughput and superiorsystem manageability relative to those of conventional message brokersolutions, and also the benefit is afforded of easy real-time matchingof messages with the same fields and values.
 14. The method of claim 1wherein said external data generating means generate recordsrepresenting streaming market data, said records are processed using aplurality of stream processing nodes and said external data processingmeans comprise a set of consumers of streaming preprocessed market datarecords, and wherein said method thereby distributes said streamingpreprocessed market data records to said set of consumers wherebybenefits are afforded of superior preprocessing flexibility, superiorsystem throughput and superior system manageability relative toconventional solutions based on message brokers, and also the benefit isafforded of easy real-time matching of records with common marketinstrument identity fields.
 15. The method of claim 1 wherein saidexternal data generating means generate records representing streamingsensor data, said records are processed using a plurality of streamprocessing node means to generate output records consumed by a set ofconsumers of streaming preprocessed sensor data records, wherebybenefits are afforded of superior preprocessing flexibility, superiorthroughput and superior system manageability relative to conventionalsolutions based on message brokers, and also the benefit is afforded ofeasy real-time matching of records with common sensor identity fieldswithin a specified time window.
 16. The method of claim 1 wherein saidexternal data generating means generate records representing streaminglocation data records for mobile devices and said external dataprocessing means comprise a set of consumers of streaming preprocessedlocation based data records, and wherein said method thereby distributessaid streaming preprocessed location data records to said set ofconsumers whereby benefits are afforded of superior preprocessingflexibility, superior throughput, and superior system manageabilityrelative to conventional solutions based on message brokers, and alsothe benefit is afforded of easy real-time matching of records with thesame location fields within a specified time window.
 17. The method ofclaim 1 wherein said external data generating means generate recordsrepresenting streaming sources of service component data records andsaid external data processing means comprise a plurality of consumers ofstreaming preprocessed service detail records, and wherein said methodthereby merges, aggregates, and otherwise assembles complete servicedetail records from said streaming sources whereby benefits are affordedof superior preprocessing flexibility, superior throughput and superiorsystem manageability relative to those of conventional service datamediation solutions.
 18. The method of claim 1 wherein said externaldata generating means generate records representing streaming sources ofcomponent data records and said external data processing means comprisea set of consumers of streaming preprocessed data records, and whereinsaid method thereby merges, aggregates, and otherwise assembles completedata records from said streaming sources whereby benefits are affordedof superior preprocessing flexibility, superior throughput and superiorsystem manageability relative to those of conventional extract,translate and load systems.